<template>
    <el-form-item label="静态文字">
        <el-input type="textarea" v-model="optionModel.textContent" @blur="handleBlur"></el-input>
    </el-form-item>
</template>

<script setup>
defineOptions({
    name:"textContent-editor"
})

const props = defineProps({
    optionModel:{
        type:Object,
        required:true
    },
    designer:{
        type:Object,
        default:()=>({})
    },
    selectWidget:{
        type:Object,
        default:()=>({}) 
    }
})

const handleSetFieldValue = (val)=>{
    const setFieldVal =props.designer.getCurFieldFunById(props.selectWidget.id)
    setFieldVal(val)
}

const handleBlur = ()=>{
    handleSetFieldValue(props.optionModel.textContent)
}
</script>

<style lang='scss' scoped></style>